package com.whfc.ms.api.uni.service.impl;

import com.whfc.common.exception.BizException;
import com.whfc.common.result.PageData;
import com.whfc.ms.api.uni.service.MsCarWashDataService;
import com.whfc.uni.entity.CarWashData;
import com.whfc.uni.service.CarInoutRecordService;
import com.whfc.uni.service.CarWashDataService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class MsCarWashDataServiceImpl implements MsCarWashDataService {

    @DubboReference(interfaceClass = CarWashDataService.class, version = "1.0.0")
    private CarWashDataService carWashDataService;

    @Override
    public void add(CarWashData carWashData) throws BizException {
        carWashDataService.add(carWashData);
    }

    @Override
    public PageData<CarWashData> listPage(Integer pageNum, Integer pageSize, Integer deviceId, Date startTime, Date endTime) {
        return carWashDataService.listPage(pageNum,pageSize,deviceId,startTime,endTime);
    }

    @Override
    public List<CarWashData> list(Integer deviceId, Date startTime, Date endTime) {
        return carWashDataService.list(deviceId,startTime,endTime);
    }
}
